import { SetMetadata } from '@nestjs/common';
import { PERMISSIONS_KEY } from '../guards/permission.guard';

/**
 * 需要权限装饰器
 * @param permissions 需要的权限标识数组
 * @returns 装饰器
 */
export const RequiresPermissions = (...permissions: string[]) =>
  SetMetadata(PERMISSIONS_KEY, permissions); 